<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../../../common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<jsp:include page="../../../common/head.jsp">
			 <jsp:param name="_useTab" value="true"/>
			 <jsp:param name="_useCalendar" value="true"/>
		</jsp:include>

		<title>汇总上报查看</title>
		<script language="JavaScript">
			
			//返回
			function goBack()
			{
				window.location.href="listReportFeeDetail.do";
			}
			$(document).ready(function()
			{
				xjTabs.initTab();
			});
			//查看费用明细
			function showData(feeId)
			{
				ModalWindow("jump.do?path=showFeeDetail.do&feeId="+feeId,800,600);
			}
		</script>
	</head>
	<body>
	<form action="listfeeReport.do" name="form1" id="form1" method="post">
	<div id="body_div">
	<w:ShowTitle name="汇总上报查看" useSubmitKey="false">
	<w:TitleButton funcName="返回" onClickFunction="goBack()" urlImg="${ctx}/images/main/back.png"/>
	</w:ShowTitle>
	<div id="body_content">
		<div class="Sliding_tab">
			<ul>
				<li></li><li><span class="tabsLink" id="setTab0" link="#">费用上报、核销信息</span></li><li></li>
				<li></li><li><span class="tabsLink" id="setTab1" link="#">费用明细</span></li><li></li>
				<c:if test="${feeReport.reportState eq '已报销'}">
				<li></li><li><span class="tabsLink" id="setTab1" link="#">汇款执行信息</span></li><li></li>
				</c:if>
			</ul>
		</div>
		<table width="100%" id="content0" class="tabContent">
            <tr>
              <td width="120" class="right_align">地区</td>
              <td class="left_align">
				${feeReport.areaName}
			  </td>
              <td width="120" class="right_align"><span class="left_align">事业部</span></td>
              <td class="left_align">
				${feeReport.areaDeptName}
			  </td>
	              <td width="120" class="right_align">经手人</td>
	              <td class="left_align">
	              	${feeReport.createUserName }
	              </td>
			</tr>
			<tr>
	              <td class="right_align">核销月份</td>
	              <td class="left_align">
	              		${feeReport.feeReportYear }${feeReport.feeReportMonth }
	              </td>
	              <td class="right_align">终止日期</td>
	              <td class="left_align">
	              	<fmt:formatDate value='${feeReport.endDate}' pattern="yyyy-MM-dd" />
	              </td>
	              <td></td>
	              <td></td>
			</tr>
			<tr>
	              <td class="right_align">票据金额</td>
	              <td class="left_align">
	              	${feeReport.reportBillAmount}
	              </td>
	              <td class="right_align">票据张数</td>
	              <td class="left_align">
	              	${feeReport.reportBillCount}
	              </td>
	              <td></td>
	              <td></td>
			</tr>
			<tr>
	              <td class="right_align">凭证金额</td>
	              <td class="left_align">
	              	${feeReport.reportCertificateAmount}
	              </td>
	              <td class="right_align">凭证张数</td>
	              <td class="left_align">
	              	${feeReport.reportCertificateCount}
	              </td>
	              <td></td>
	              <td></td>
			</tr>
            <c:if test="${feeReport.reportState eq '核销完毕' or feeReport.reportState eq '已核销' or feeReport.reportState eq '已报销'}">
	            <tr>
	              <td class="right_align">核销票据金额</td>
	              <td class="left_align">
	              	${feeReport.billAmountTol}
	              </td>
	              <td class="right_align">核销票据张数</td>
	              <td class="left_align">
	              	${feeReport.billCountTol}
	              </td>
	              <td></td>
	              <td></td>
			</tr>
	         <tr>
	              <td class="right_align">核销凭证金额</td>
	              <td class="left_align">
	              	${feeReport.certificateAmountTol}
	              </td>
	              <td class="right_align">核销凭证张数</td>
	              <td class="left_align">
	              	${feeReport.certificateCountTol}
	              </td>
	              <td></td>
	              <td></td>
				</tr>
	         <tr>
	         <tr>
	              <td class="right_align">凭证起始号</td>
	              <td class="left_align">
	              	${feeReport.certificateNoStart}
	              </td>
	              <td class="right_align">凭证终止号</td>
	              <td class="left_align">
	              	${feeReport.certificateNoEnd}
	              </td>
	              <td></td>
	              <td></td>
				</tr>
	         <tr>
	              <td class="right_align">其他费用说明</td>
	              <td class="left_align" colspan="5">
	              	${feeReport.otherFeeRemark}
	              </td>
	              
				</tr>
	         <tr>
	              <td class="right_align">核销备注</td>
	              <td class="left_align" colspan="5">
	              	${feeReport.writtenOffReportRemark}
	              </td>
	              
				</tr>
            </c:if>
          </table>
				<table width="100%" id="content1" class="tabContent listTable">
					<tr>
                        <td width="150" class="td_title">地区</td>
                        <td class="td_title">事业部</td>
                        <td class="td_title">发生对象</td>
                        <td class="td_title">对象名称</td>
                        <td class="td_title">费用类别</td>
                        <td width="80" class="td_title">登记日期</td>
                        <td width="80" class="td_title">财务主管</td>
                        <td width="80" class="td_title">金额</td>
                        <td width="80" class="td_title">费用日期</td>
                        <td width="100" class="td_title">操作</td>
                      </tr>
					<c:forEach items="${datalist}" var="obj">
						<tr>
							<td class="left_align">${obj.areaName}</td>
							<td class="left_align">${obj.areaDeptName}</td>
							<td class="left_align">${obj.feeTarget}</td>
							<td class="left_align">${obj.targetName}</td>
							<td class="left_align">${obj.feeTypeName}</td>
							<td class="left_align"><fmt:formatDate value='${obj.createDate}' pattern="yyyy-MM-dd" /></td>
							<td class="left_align">${obj.financeSupervisorName}</td>
							<td class="left_align">${obj.billAmount+obj.certificateAmount}</td>
							<td class="left_align"><fmt:formatDate value='${obj.feeDate}' pattern="yyyy-MM-dd" /></td>
							<td>
								<a href="#" onclick="javascript:showData('${obj.feeId}')">查看</a>
							</td>
						</tr>
					</c:forEach>
				</table>
			<c:if test="${feeReport.reportState eq '已报销'}">
			<table width="100%" id="content2" class="tabContent">
            <tr>
              <td width="120" class="right_align">企业名称</td>
              <td class="left_align">
				${feeReport.remitCompanyName}
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">凭证张数</td>
              <td class="left_align">
              	${feeReport.billCountTol}
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">凭证起始号</td>
              <td class="left_align">
              	${feeReport.certificateNoStart}
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">凭证终止号</td>
              <td class="left_align">
              	${feeReport.certificateNoEnd}
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">汇款执行人</td>
              <td class="left_align">
              	${feeReport.remitUserName}
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">汇款日期</td>
              <td class="left_align">
              	<fmt:formatDate value='${feeReport.remitDate}' pattern="yyyy-MM-dd" />
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">汇款执行状态</td>
              <td class="left_align">
              	${feeReport.remitState}
			  </td>
			 </tr>
			<tr>
              <td width="80" class="right_align">汇款执行备注</td>
              <td class="left_align">
              	${feeReport.remitRemark}
			  </td>
			 </tr>
			
          </table>
          </c:if>
			</div>
		</div>	
		</form>
	</body>
</html>